package com.base.pig.controller;


import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.base.pig.entity.CommunityRenovation;
import com.base.pig.service.CommunityRenovationService;
import com.base.pig.util.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@Api(tags = "小区改造信息接口")
@RestController
@RequestMapping("/communityRenovationController")
public class CommunityRenovationController {

    @Autowired
    public CommunityRenovationService communityRenovationService;

    @ApiOperation("查询改造小区信息列表")
    @PostMapping("/queryList")
    public R queryList(){
        List<CommunityRenovation> list = communityRenovationService.list(Wrappers.<CommunityRenovation>query().lambda().orderByAsc(CommunityRenovation::getId));
        return R.ok(list);
    }






}
